package com.dongdongshop.controller;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import com.aliyun.oss.model.PutObjectRequest;
import com.dongdongshop.data.Page;
import com.dongdongshop.data.Result;
import com.dongdongshop.pojo.TbContent;
import com.dongdongshop.pojo.TbContentCategory;
import com.dongdongshop.service.ContentCategoryService;
import com.dongdongshop.service.ContentService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

@Controller
@RequestMapping("content")
public class ContentController {

    @DubboReference
    private ContentService contentService;

    @RequestMapping("selectInfo")
    @ResponseBody
    public Result selectInfo(TbContent tbContent){
        List<TbContent> list = contentService.selectInfo(tbContent);
        return Result.ok().setData(list);
    }

}
